package com.tycom.simpleapp.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.tycom.simpleapp.dataaccess.CompanyRepository;
import com.tycom.simpleapp.model.Company;

@Component
public class CompanyServiceImpl implements CompanyService {
	@Autowired
	CompanyRepository companyRepository;
	
	@Override
	public void save(Company company) {
		companyRepository.save(company);
	}

	@Override
	public List<? extends Company> saveAll(Iterable<? extends Company> companies) {
		return companyRepository.save(companies);
	}
}
